/*
Navicat SQL Server Data Transfer

Source Server         : 本地SQL Server
Source Server Version : 150000
Source Host           : localhost:1433
Source Database       : ry
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 150000
File Encoding         : 65001

Date: 2021-10-14 10:57:35
*/


-- ----------------------------
-- Table structure for corn_log
-- ----------------------------
DROP TABLE [dbo].[corn_log]
GO
CREATE TABLE [dbo].[corn_log] (
[id] bigint NOT NULL IDENTITY(1,1) ,
[threadName] nvarchar(255) NULL ,
[businessType] nvarchar(255) NULL ,
[operationType] nvarchar(50) NULL ,
[requestDate] nvarchar(255) NULL ,
[requestData] nvarchar(MAX) NULL ,
[responeDate] nvarchar(255) NULL ,
[responeData] nvarchar(MAX) NULL ,
[operationName] nvarchar(255) NULL ,
[content] nvarchar(MAX) NULL ,
[remark] nvarchar(MAX) NULL ,
[createBy] nvarchar(64) NULL ,
[createTime] datetime2(0) NULL ,
[jobName] nvarchar(255) NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[corn_log]', RESEED, 80)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'threadName')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'线程名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'threadName'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'线程名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'threadName'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'businessType')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'业务场景 查询，下单'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'businessType'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'业务场景 查询，下单'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'businessType'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'operationType')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作类型 手动，定时'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'operationType'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作类型 手动，定时'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'operationType'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'requestDate')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'请求时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'requestDate'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'请求时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'requestDate'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'requestData')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'请求参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'requestData'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'请求参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'requestData'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'responeDate')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'响应时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'responeDate'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'响应时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'responeDate'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'responeData')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'响应参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'responeData'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'响应参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'responeData'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'operationName')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作人'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'operationName'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作人'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'operationName'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'content')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'内容'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'content'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'内容'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'content'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'remark'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'createBy')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'createBy'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'createBy'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'createTime')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'createTime'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'createTime'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'corn_log', 
'COLUMN', N'jobName')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'jobName'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'corn_log'
, @level2type = 'COLUMN', @level2name = N'jobName'
GO

-- ----------------------------
-- Indexes structure for table corn_log
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table corn_log
-- ----------------------------
ALTER TABLE [dbo].[corn_log] ADD PRIMARY KEY ([id])
GO
